<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // 贪婪 勤快
      // 数量后接？表示开启懒惰模式
      const str = "<div>he <p>llo</div>";
      console.log(str.match(/<.+?>/g));
      console.log(str.match(/<.{0,}?>/g));
    </script>
  </body>
</html>
